<?php
$array1 = array('blue'  => 1, 'red'  => 2, 'green'  => 3, 'purple' => 4);
$array2 = array('GREEN' => 5, 'blue' => 6, 'yellow' => 7, 'cyan'   => 8);

var_dump(array_intersect_key($array1, $array2));

$up1 = array_change_key_case($array1, CASE_UPPER);
$up2 = array_change_key_case($array2, CASE_UPPER);

var_dump(array_intersect_key($up1, $up2));
